<template>
    <svg class="icon" :width="width" :height="height">
        <use :href="iconName" />
    </svg>
</template>

<script>
export default {
  props: {
    name: {
      type: String,
      required: true,
    },
    width: {
      type: String,
      required: false,
    },
    height: {
      type: String,
      required: false,
    },
  },
  computed: {
    iconName() {
      return `#icon-${this.name}`;
    },
  },
};
</script>

<style scoped>
.icon {
    fill: currentColor
}
</style>
